<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<style>
			#div{
				width: 100%;
				height: 3.75rem;
				background: red;
			}
		</style>
	</head>
	<body>
		<div id="div">
			<textarea rows="" cols="" id="textarea"></textarea>
		</div>
	</body>
</html>
<script>
	var ar=document.getElementById("textarea");
	console.log(ar)
	// var t="Sun, 30 Mar 2020 07:45:28 GMT";
	// var t1=new Date
	// // Sun Mar 29 2020 19:26:31 GMT+0800
	// var t=new Date(t)
	// var y=t.getFullYear()
	// console.log(t,t1)
	window.onload=function(){
		var submit=mui("#submit");
		submit[0].addEventListener("tap",function(){
			var company_name=mui("#company_name")[0].value;
			var linkman=mui("#linkman")[0].value;
			var phone=mui("#phone")[0].value;
			var party=mui("#party")[0].value;
			var need=mui("#textarea")[0].value;
			
			mui.ajax('http://140.143.206.157:5000/api/v1/company/'+targetId,{
				data:{
					company_name,
					linkname,
					phone,
					party,
					need,
					pass_word:123456
				},
				dataType:'json',//服务器返回json格式数据
				type:'post',//HTTP请求类型
				timeout:10000,//超时时间设置为10秒；
				headers:{'Content-Type':'application/json'},	              
				success:function(data){
					var data=data.info;
					console.log(data)
				},
				error:function(xhr,type,errorThrown){
					//异常处理；
					console.log(type);
				}
			});
		},true)
		console.dir(submit[0])
	}
</script>